{% extends "!layout.html" %}

{% block extrahead %}

{% if google_adsense is defined %}
<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "{{ google_adsense }}",
    enable_page_level_ads: true
  });
</script>
{% endif %}

{% if google_analytics is defined %}
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-114314379-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{ google_analytics }}');
</script>
{% endif %}
{% endblock %}

{% block menu %}
{{ super() }}
{% if google_adsense is defined and google_adsense_slot is defined %}
<hr />
<div style="padding: 0;">
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <ins class="adsbygoogle"
         style="display:inline-block;width:300px;height:250px"
         data-ad-client="{{ google_adsense }}"
         data-ad-slot="{{ google_adsense_slot }}"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
</div>
{% endif %}
{% endblock %}

{% block extrabody %}
{% if 'wip' in meta %} 
<img style="position: fixed; top: 0; right: 0; z-index: 100; height:300px; border: 0;" src="_images/wip.png">
{% endif %}
{% endblock %}